package com.example.sherlockzhong.plush_v2.CardBeans;
/*
 * Created by DosonLeung on 2014/7/30.
 */

import android.widget.ImageView;
import android.widget.TextView;

import com.example.sherlockzhong.plush_v2.R;
import com.example.sherlockzhong.plush_v2.View.CardHorizontalScrollView;


public class WeatherCardBean {
    private static int cardId = 6;
    private static String cardClass = "Weather";
    int weather_icon;
    String weather_temperature;
    String weather_address;
    String weather_conditions;
    String weather_temperature_difference;
    String weather_rainfall;
    String weather_pm25;

    public WeatherCardBean() {
        this.weather_icon = R.drawable.clear_morning;
        this.weather_temperature = "";
        this.weather_address = "";
        this.weather_conditions = "";
        this.weather_temperature_difference = "";
        this.weather_rainfall = "";
        this.weather_pm25 = "";
    }

    public static int getCardId() {
        return cardId;
    }

    public static String getCardClass() {
        return cardClass;
    }

    public int getWeatherIcon() {
        return weather_icon;
    }

    public void setWeatherIcon(int weather_icon) {
        this.weather_icon = weather_icon;
    }

    public String getWeatherTemperature() {
        return weather_temperature;
    }

    public void setWeatherTemperature(String weather_temperature) {
        this.weather_temperature = weather_temperature;
    }

    public String getWeatherAddress() {
        return weather_address;
    }

    public void setWeatherAddress(String weather_address) {
        this.weather_address = weather_address;
    }

    public String getWeatherConditions() {
        return weather_conditions;
    }

    public void setWeatherConditions(String weather_conditions) {
        this.weather_conditions = weather_conditions;
    }

    public String getWeatherTemperatureDifference() {
        return weather_temperature_difference;
    }

    public void setWeatherTemperatureDifference(String weather_temperature_difference) {
        this.weather_temperature_difference = weather_temperature_difference;
    }

    public String getWeatherRainfall() {
        return weather_rainfall;
    }

    public void setWeatherRainfall(String weather_rainfall) {
        this.weather_rainfall = weather_rainfall;
    }

    public String getWeatherPM25() {
        return weather_pm25;
    }

    public void setWeatherPM25(String weather_pm25) {
        this.weather_pm25 = weather_pm25;
    }

    public void insertTo(CardHorizontalScrollView v) {
        ImageView weather_icon = (ImageView) v.findViewById(R.id.weather_icon);
        TextView weather_temperature = (TextView) v.findViewById(R.id.weather_temperature);
        TextView weather_address = (TextView) v.findViewById(R.id.weather_address);
        TextView weather_conditions = (TextView) v.findViewById(R.id.weather_conditions);
        TextView weather_temperature_difference = (TextView) v.findViewById(R.id.weather_temperature_difference);
        TextView weather_rainfall = (TextView) v.findViewById(R.id.weather_rainfall);
        TextView weather_humidity = (TextView) v.findViewById(R.id.weather_humidity);

        weather_icon.setImageResource(this.getWeatherIcon());
        weather_temperature.setText(this.getWeatherTemperature());
        weather_address.setText(this.getWeatherAddress());
        weather_conditions.setText(this.getWeatherConditions());
        weather_temperature_difference.setText(this.getWeatherTemperatureDifference());
        weather_rainfall.setText(this.getWeatherRainfall());
        weather_humidity.setText(this.getWeatherPM25());
    }
}

